#ifndef DATABASE_H
#define DATABASE_H

#include <QObject>
#include <QtSql>
#include <stdlib.h>

class Database : public QObject
{  
  Q_OBJECT     
    public:
        Database(QObject* = 0); 
        void setDatabase(QString);
        void prepareDB(); 
        void setTable(QString); 
        void where(QString); 
        void SelectAll();
        void Select(QString);
        void insert(QString *, QString *); 
        void update(QString, QString);
        void getResult()
    
    private:    
        QSqlDatabase db;
        QString table;
        QString where;
        QString * result;  
        QSqlQuery query;      
};

#endif
